import type { AppRouteModule } from '@/router/types';

import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';

const locale = 'routes.institution';
/**
 * 机构管理
 */
const institution: AppRouteModule = {
  path: '/institution',
  name: 'Institution',
  component: LAYOUT,
  redirect: '/institution/institutionList',
  meta: {
    orderNo: 10,
    icon: 'ion:business-outline',
    title: t(`${locale}.institution`),
  },
  children: [
    {
      path: 'institutionList',
      name: 'InstitutionList',
      component: () => import('@/views/institution/institutionList/index.vue'),
      meta: {
        title: t(`${locale}.institutionList.title`),
      },
    },
    {
      path: 'activityList',
      name: 'activityList',
      component: () => import('@/views/institution/activityList/index.vue'),
      meta: {
        title: t(`${locale}.activityList.title`),
      },
    },

    {
      path: 'activityDetail/:id',
      name: 'activityDetail',
      component: () => import('@/views/institution/activityList/activityDetail/index.vue'),
      meta: {
        title: t(`${locale}.activityList.activityDetail.title`),
        hideMenu: true,
      },
    },
    {
      path: 'businessOpportunitiesManage',
      name: 'businessOpportunitiesManage',
      component: () => import('@/views/institution/businessOpportunitiesManage/index.vue'),
      meta: {
        title: '供需管理',
      },
    },
    {
      path: 'promotionReviewDetail',
      name: 'promotionReviewDetail',
      component: () => import('@/views/institution/businessOpportunitiesManage/PromotionReview/detail.vue'),
      meta: {
        title: '供需详情',
        hideBreadcrumb: true,
        hideMenu: true,
      },
    },
    {
      path: 'opDtail',
      name: 'opDtail',
      component: () => import('@/views/institution/businessOpportunitiesManage/opDetail/index.vue'),
      meta: {
        title: '供需详情',
        hideBreadcrumb: true,
        hideMenu: true,
      },
    },
    {
      path: 'followRecords',
      name: 'followRecords',
      component: () => import('@/views/institution/businessOpportunitiesManage/followRecords/index.vue'),
      meta: {
        title: '跟进记录',
        hideBreadcrumb: true,
        hideMenu: true,
      },
    },
    {
      path: 'promotionSettings',
      name: 'promotionSettings',
      component: () => import('@/views/institution/businessOpportunitiesManage/promotionSettings/index.vue'),
      meta: {
        title: '推广设置',
        hideBreadcrumb: true,
        hideMenu: true,
      },
    }
  ],
};

export default institution;
